package com.study.utils;

import org.springframework.security.authentication.encoding.Md5PasswordEncoder;

/**
 * Created by think on 2016/7/31.
 */
public class MD5Util {
    public static String createMd5(String username,String password){
        Md5PasswordEncoder encoder = new Md5PasswordEncoder();
        encoder.setEncodeHashAsBase64(true);
        return encoder.encodePassword(password,username);
    }
}
